<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
	</head>
	<body>
		<div id="app">
			<form action="http://baidu.com">
		<div>
			用户名:<input type="text" v-model="username" />
		</div>
		<div>
			<input type="radio" value="男" name="sex" v-model="sex" />男
			<input type="radio" value="女" name="sex" v-model="sex" />女
		</div>
		<div>
			<input type="checkbox" value="踢球" name="hobby" v-model="hobby" />踢球
			<input type="checkbox" value="玩球" name="hobby" v-model="hobby" />玩球
			<input type="checkbox" value="打球" name="hobby" v-model="hobby" />打球
		</div>
		<div>
			<input type="submit" value="提交" @click.prevent="formBtn"/>
		</div>
		<div>
			<input type="number" v-model.number="ageTest" />
			<button @click="addNum">加法</button>
		</div>
		<input type="text" v-model.lazy="msg" /> {{msg}}
		</div>
		</form>
		<script src="../js/vue.js"></script>
		<script>
		const app = new Vue({
			el:"#app",
			data:{
				username:'aaaa',
				sex:'女',
				hobby:[],
				msg:''
	 },
			methods:{
			formBtn(){
				alert("提交数据")
			},
			addNum(){
				this.ageTest=this.ageTest+1
			}
			
			}
		})
		let url1 = "http://localhost:8090/axios/getUserById?id=1"
		axios.get(url1).then(Promise=>{
			console.log(Promise.data)
		})
		let sex='女'
		let name='貂蝉'
		let url2 = `http://localhost:8090/user/{sex}/{name}`
		axios.get(url2).then(Promise=>{
			console.log(Promise.data)
		})
		let user={
			name:'貂蝉',
			sex:'女',
			age=18
		}
		let url1 = "http://localhost:8090/axios/getUser"
		axios.get(url3,{params:user}).then(Promise=>{
			console.log(Promise.data)
		})
		</script>
		
	</body>
</html>
